// 三个页面通用的列
const commonColumn = [
  {
    label: '销售收入',
    prop: 'salesIncome',
    minWidth: 120,
    showTooltip: false,
    align: 'right',
    formatterContent: function(row, column, cellValue, index) {
      return parseInt(cellValue).toLocaleString();
    }
  },
  {
    label: '前台毛利额',
    prop: 'frontGrossProfit',
    minWidth: 120,
    showTooltip: false,
    align: 'right',
    formatterContent: function(row, column, cellValue, index) {
      return parseInt(cellValue).toLocaleString();
    }
  },
  {
    label: '销售毛利额',
    prop: 'saleGrossProfit',
    minWidth: 120,
    showTooltip: false,
    align: 'right',
    formatterContent: function(row, column, cellValue, index) {
      return parseInt(cellValue).toLocaleString();
    }
  },
  {
    label: '损耗',
    prop: 'loss',
    minWidth: 120,
    showTooltip: false,
    align: 'right',
    formatterContent: function(row, column, cellValue, index) {
      return parseInt(cellValue).toLocaleString();
    }
  },
  {
    label: '盘点',
    prop: 'inventory',
    minWidth: 120,
    showTooltip: false,
    align: 'right',
    formatterContent: function(row, column, cellValue, index) {
      return parseInt(cellValue).toLocaleString();
    }
  },
  {
    label: '折让',
    prop: 'discount',
    minWidth: 120,
    showTooltip: false,
    align: 'right',
    formatterContent: function(row, column, cellValue, index) {
      return parseInt(cellValue).toLocaleString();
    }
  },
  {
    label: '前台毛利率',
    prop: 'frontDeskGrossMargin',
    minWidth: 120,
    showTooltip: false,
    align: 'right',
    formatterContent: function(row, column, cellValue, index) {
      return (cellValue * 100).toFixed(1) + '%';
    }
  },
  {
    label: '销售毛利率',
    prop: 'grossProfitMargin',
    minWidth: 120,
    showTooltip: false,
    align: 'right',
    formatterContent: function(row, column, cellValue, index) {
      return (cellValue * 100).toFixed(1) + '%';
    }
  }
];

// 需要样式的单元格
export const needStyleColumns = ['frontDeskGrossMargin', 'grossProfitMargin'];

// 城市版列表项
export const cityVersionColumns = [
  {
    label: '序号',
    prop: 'sortId',
    minWidth: 50,
    showTooltip: true
  },
  {
    label: '城市名',
    prop: 'cityName',
    minWidth: 120,
    align: 'center',
    showTooltip: true
  }
].concat(commonColumn);
// 单品版列表项
export const singleVersionColumn = [
  {
    label: '序号',
    prop: 'sortId',
    minWidth: 50,
    showTooltip: true
  },
  {
    label: '商品代码',
    prop: 'commodityCode',
    minWidth: 120,
    showTooltip: true
  },
  {
    label: '商品名称',
    prop: 'commodityName',
    minWidth: 120,
    showTooltip: true
  },
  {
    label: '商品规格',
    prop: 'specification',
    minWidth: 120,
    showTooltip: true
  }
].concat(commonColumn);
// 门店版列表项
export const storeVersionColumn = [
  {
    label: '序号',
    prop: 'sortId',
    minWidth: 50,
    showTooltip: true
  },
  {
    label: '门店名称',
    prop: 'storeName',
    minWidth: 120,
    align: 'left',
    showTooltip: true
  }
].concat(commonColumn);
